package com.lyncs.ods.modules.txn.service;

import com.lyncs.ods.common.api.CommonPage;
import com.lyncs.ods.req.ListPageSearchReq;
import com.lyncs.ods.req.SaveOrderReq;
import com.lyncs.ods.resp.*;

/**
 * @author alex
 * @date 2022/2/5 22:45
 * @description
 */
public interface OrderService {

    /**
     * create order
     *
     * @param req request info
     * @return
     */
    Long saveOrder(SaveOrderReq req);

    /**
     * 删除订单
     *
     * @param orderId orderId
     */
    void reverseOrder(Long orderId);

    /**
     * 获取订单列表
     *
     * @param req request info
     */
    CommonPage<ListPageResp> listOrder(ListPageSearchReq req);

    /**
     * get order detail info
     *
     * @param orderId orderId
     * @return order detail info
     */
    OrderDetailInfoResp getOrderDetail(Long orderId);

    /**
     * 订单 置顶/取消
     *
     * @param orderId orderId
     * @param type    type
     */
    void stickyOnTop(Long orderId, Integer type);

    /**
     * 订单变更历史
     *
     * @param orderId  orderId
     * @param page     page
     * @param pageSize pageSize
     * @return logs
     */
    CommonPage<TxnEditLogResp> getOrderEditLog(Long orderId, Integer page, Integer pageSize);

    /**
     * sku交付历史
     *
     * @param orderId orderId
     * @param skuId   skuId
     * @return result
     */
    OrderDeliverLogResp getOrderSkuDeliverLog(Long orderId, Long skuId);
}
